package com.tz.fruit.service;


import com.tz.fruit.entity.*;

import java.util.List;

/**
 * Created by Tyranty on 2017/7/24 0024.
 */
public interface ICartService {

    //模拟商品
    void saveProduct(Product product);
    Product findProductByPid(Long pid);
    void saveUser(User user);
    User findUserByUserId(Long userId);
    void saveCart(Cart cart);
    void updateCart(Cart cart);
    Cart findCartByUserId(Long userId);
    void saveOrder(Order order);
    Order findOrderByOrderNo(String orderNo);//根据商品编号查询订单
    void saveOrderItem(OrderItem orderItem);
    OrderItem findOrderItemByPNo(String pNo);
    OrderItem findOrderItemByItemId(Long itemId);
    void updateOrderItem(OrderItem orderItem);
    void deleteByOrderItemId(Long itemId);
    //查询购物车中商品信息
    List<OrderItem> findAll(Long cartId);
}
